<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	request.setAttribute("path", basePath);
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">
		<title>定时器</title>
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<link rel="icon" href="${path}/logo/url.ico" type="image/x-icon" />
		<link rel="shortcut icon" href="${path}/logo/url.ico"
			type="image/x-icon" />
		<link rel="stylesheet" type="text/css" href="${path}/css/main.css" />
		<script type="text/javascript"
			src="${path}/jquery/jquery-1.4.2.min.js">
</script>
		<script type="text/javascript"
			src="${path}/js/datepicker/WdatePicker.js">
</script>
		<script type="text/javascript" src="${path}/js/timer.js">
</script>
	</head>
	<body>
		<div class="timer_background">
			<div class="timer">
				<form id="addStatus" method="post">
					<div style="margin-left: 60px; margin-top: 60px;">创建一个新的定时广播（定时间隔至少5分钟）</div>
					<div style="margin-left: 60px; margin-top: 5px;">
						<textarea id="status" name="status" cols="65" rows="10"></textarea>
					</div>
					<div style="margin-left: 60px; margin-top: 25px;">
						发送时间：
						<input type="hidden" id="today" value="<fmt:formatDate value="${nowdate}" pattern="yyyy-MM-dd"/>" />
						<input id="publishTime" name="publishDate" type="text"
							style="width: 120px; height: 20px;"
							value="<fmt:formatDate value="${nowdate}" pattern="yyyy-MM-dd"/>"
							onfocus="WdatePicker({minDate:'#F{$dp.$D(\'today\')}',skin:'ext',dateFmt:'yyyy-MM-dd'});" />
						&nbsp;
						<input type="hidden" id="nowHour" value="${nowhour}" />
						<select name="publishHour" id="hour">
							<option value="00">
								0
							</option>
							<option value="01">
								1
							</option>
							<option value="02">
								2
							</option>
							<option value="03">
								3
							</option>
							<option value="04">
								4
							</option>
							<option value="05">
								5
							</option>
							<option value="06">
								6
							</option>
							<option value="07">
								7
							</option>
							<option value="08">
								8
							</option>
							<option value="09">
								9
							</option>
							<option value="10">
								10
							</option>
							<option value="11">
								11
							</option>
							<option value="12">
								12
							</option>
							<option value="13">
								13
							</option>
							<option value="14">
								14
							</option>
							<option value="15">
								15
							</option>
							<option value="16">
								16
							</option>
							<option value="17">
								17
							</option>
							<option value="18">
								18
							</option>
							<option value="19">
								19
							</option>
							<option value="20">
								20
							</option>
							<option value="21">
								21
							</option>
							<option value="22">
								22
							</option>
							<option value="23">
								23
							</option>
						</select>
						时&nbsp;
							<input type="hidden" id="nowMinute" value="${nowminute}" />
							<select name="publishMinute" id="minute">
								<option value="00">
									0
								</option>
								<option value="01">
									1
								</option>
								<option value="02">
									2
								</option>
								<option value="03">
									3
								</option>
								<option value="04">
									4
								</option>
								<option value="05">
									5
								</option>
								<option value="06">
									6
								</option>
								<option value="07">
									7
								</option>
								<option value="08">
									8
								</option>
								<option value="09">
									9
								</option>
								<option value="10">
									10
								</option>
								<option value="11">
									11
								</option>
								<option value="12">
									12
								</option>
								<option value="13">
									13
								</option>
								<option value="14">
									14
								</option>
								<option value="15">
									15
								</option>
								<option value="16">
									16
								</option>
								<option value="17">
									17
								</option>
								<option value="18">
									18
								</option>
								<option value="19">
									19
								</option>
								<option value="20">
									20
								</option>
								<option value="21">
									21
								</option>
								<option value="22">
									22
								</option>
								<option value="23">
									23
								</option>
								<option value="24">
									24
								</option>
								<option value="25">
									25
								</option>
								<option value="26">
									26
								</option>
								<option value="27">
									27
								</option>
								<option value="28">
									28
								</option>
								<option value="29">
									29
								</option>
								<option value="30">
									30
								</option>
								<option value="31">
									31
								</option>
								<option value="32">
									32
								</option>
								<option value="33">
									33
								</option>
								<option value="34">
									34
								</option>
								<option value="35">
									35
								</option>
								<option value="36">
									36
								</option>
								<option value="37">
									37
								</option>
								<option value="38">
									38
								</option>
								<option value="39">
									39
								</option>
								<option value="40">
									40
								</option>
								<option value="41">
									41
								</option>
								<option value="42">
									42
								</option>
								<option value="43">
									43
								</option>
								<option value="44">
									44
								</option>
								<option value="45">
									45
								</option>
								<option value="46">
									46
								</option>
								<option value="47">
									47
								</option>
								<option value="48">
									48
								</option>
								<option value="49">
									49
								</option>
								<option value="50">
									50
								</option>
								<option value="51">
									51
								</option>
								<option value="52">
									52
								</option>
								<option value="53">
									53
								</option>
								<option value="54">
									54
								</option>
								<option value="55">
									55
								</option>
								<option value="56">
									56
								</option>
								<option value="57">
									57
								</option>
								<option value="58">
									58
								</option>
								<option value="59">
									59
								</option>
							</select>分&nbsp;&nbsp;&nbsp;&nbsp;
							下一条增加<input type="text" id="nextTimer" name="nextTimer" style="width:40px; text-align:center;" value="${nextTimer}" />分钟
					</div>
					<div style="margin-left: 200px; margin-top: 25px;">
						<input type="button" style="width:80px; height:40px; text-align:center;" value="定时发送" onclick="javascript:timerSend('${path}');" />
						&nbsp;&nbsp;&nbsp;&nbsp;
						<input type="button" style="width:80px; height:40px; text-align:center;" value="立即发送" onclick="javascript:nowSend('${path}');" />
					</div>
				</form>
				
			</div>
		</div>
	</body>
</html>
